using System.Collections.Generic;
using UnityEngine;

namespace HEFramework
{
    /// <summary>
    /// Element data,Element.xlsx
    /// </summary>
    public class DRElement:IData
    {
        
        /// <summary>
        /// ID  different
        /// </summary>
        public int ID { get; protected set; }
        /// <summary>
        /// 名字  outputKey
        /// </summary>
        public string Name { get; protected set; }
        /// <summary>
        /// 图集路径  
        /// </summary>
        public string AtlasPath { get; protected set; }
        /// <summary>
        /// 图集名称  
        /// </summary>
        public string AtlasName { get; protected set; }
        /// <summary>
        /// 图标名称  
        /// </summary>
        public string IconName { get; protected set; }
        /// <summary>
        /// 等级组  
        /// </summary>
        public int[] Levels { get; protected set; }
        /// <summary>
        /// 技能效果组  
        /// </summary>
        public int[] SkillEffectIds { get; protected set; }

        
        public void ParseDataRow(string input)
        {
            string[] text = input.Split('	');
            int index = 0;
        
            ID = int.Parse(text[index++]);
            Name = DataTableExtension.GetStringFromKey(text[index++]);
            AtlasPath = text[index++];
            AtlasName = text[index++];
            IconName = text[index++];
            Levels = DataTableExtension.ParseIntArr(text[index++]);
            SkillEffectIds = DataTableExtension.ParseIntArr(text[index++]);

        }
        
        private void AvoidJIT()
        {
            new Dictionary<int, DRElement>();
        }
    }
}